package com.balabala.gym_system.dao;

import com.balabala.gym_system.pojo.dto.AdvertisingDto;
import com.balabala.gym_system.pojo.dto.BaseDeleteDto;
import com.balabala.gym_system.pojo.entity.Advertising;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;


import java.util.List;

public interface AdvertisingDao {
    //插入广告
    void insertAd(Advertising advertising);

    //修改广告
    void updateAd(Advertising advertising);

    //根据id删除广告
    void deleteById(String id);

    //根据ids批量删除广告
    void deleteByIds(List<String> ids);

    //根据上线、下线（状态）删除广告
    List<Advertising> findByStatus(Integer status);

    //查询所有
    List<Advertising> findAll();

    //根据id查询广告
    Advertising findById(String id);

    //分页查询
    List<Advertising> findAdByAdvertisingDto(AdvertisingDto advertisingDto);

    //根据条件查询总记录数
    Long findAdByAdvertisingDtoCount(AdvertisingDto advertisingDto);

    //根据位置查询指定的位置
    List<Advertising> findAdByPosition(Integer position);
}
